<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>用户列表</title>
    <link rel="stylesheet" href="assets/css/amazeui.css">
</head>
<body>

<div class="am-progress">
    <div class="am-progress-bar am-progress-bar-secondary" style="width: 10%"></div>
</div>


<a href="addstu.php" class="am-btn am-btn-warning" >添加学生</a>
<table class="am-table am-table-bordered am-table-striped am-table-compact">
    <thead>
    <tr>
        <th>名字</th>
        <th>学号</th>
        <th>性别</th>
        <th>年龄</th>
        <th>电话</th>
    </tr>
    </thead>
    <tbody>

    {foreach $students as $stu}
    <tr>
        <td>{$stu['Stud_name']}</td>
        <td>{$stu['Stud_id']}</td>
        <td>{$stu['Stud_sex']}</td>
        <td>{$stu['Birth_date']}</td>
        <td>{$stu['Mobile']}</td>
        <td>
            <a class="am-btn am-btn-success" href="index.php?action=student&func=findStudent&id={$stu['Stud_id']}>">编辑</a>
            <a class="am-btn am-btn-danger" href="index.php?action=student&func=del&id={$stu['Stud_id']}>">删除</a></td>
    </tr>

    {/foreach}


    </tbody>
</table>

<ul class="am-pagination am-pagination-centered">

    当前第{$page}页,共{$count_page}页

    {if $page != 1}
    //$ss = $page - 1;
    //ss:{$Student->ss}
    <li><a href=\"index.php?action=student&func=lists&page=1\">首页</a></li>
    <li><a href=\"index.php?action=student&func=lists&page=ss \">&laquo;</a></li>
    {else}
       <li class=\"am-disabled\" ><a href=\"#\" >首页</a></li>
        <li class=\"am-disabled\" ><a href=\"#\" >&laquo;</a></li>
    {/if}
    {for $i=5 to 1}
    {if {"$page"} - $i < 1 }
    continue;
    {/if}
    <li><a href='index.php?action=student&func=lists&page={"$ss"}' >{"$ss"}</a></li>
    {/for}
    <li class="am-active"><a href="index.php?action=student&func=lists&page={'$page'} + $i">{"$page"}</a></li>

    {for $i=1 to 5}
    {if ({"$page"} + $i) > {"$count_page"}}
    break;
    {/if}
    <li><a href="index.php?action=student&func=lists&page={'$ss'}">{"$ss"}</a></li>
    {/for}
    {if {"$page"} < {"$count_page"}}
       <li><a href=\"index.php?action=student&func=lists&page={'$ss'} \">&raquo;</a></li>
        <li><a href=\"index.php?action=student&func=lists&page=$count_page\">尾页</a></li>
    {else}
        <li class=\"am-disabled\" ><a href=\"#\" >&raquo;</a></li>
       <li class=\"am-disabled\" ><a href=\"#\" >尾页</a></li>
    {/if}

</ul>

</body>
</html>
